<!DOCTYPE html>
<html>
<head>
	<title></title>
	<meta charset="utf-8">
</head>
<body>

</body>
<script type="text/javascript">
// demo1
define(function(require , exports , module) {

    var myPost = function(url,args){
        var body = $(document.body),
            form = $("<form method='post'></form>"),
            input;
        form.attr({"action":url});
        $.each(args,function(key,value){
            input = $("<input type='hidden'>");
            input.attr({"name":key});
            input.val(value);
            form.append(input);
        });

        form.appendTo(document.body);
        form.submit();
        document.body.removeChild(form[0]);
    }

    module.exports.myPost = myPost;
});
// demo2
function submitForm(action, params) {  
    var form = $("<form></form>");  
    form.attr('action', action);  
    form.attr('method', 'post');  
    form.attr('target', '_self');  
    for(var i=0 ; i < params.length;i ++){  
        var deinput = $("<input type='hidden' name='"+params[i].name+"' />");  
        deinput.attr('value', params[i].val);  
        form.append(deinput);  
    }  
    form.appendTo("body");  
    form.css('display', 'none');  
    form.submit();  
} 
</script>
</html>